package ualrcdg.client;

import java.util.Random;

import android.app.Application;
import android.os.Bundle;

/**
 * This class is used to maintain the state throughout the application
 */
public class CDGApplication extends Application
{
	private String MyState;
	private static final Random r = new Random( );

	//private static final Communicator myCommunicator = new Communicator();

	public void onCreate( Bundle b )
	{

	}

	public static String generateId( )
	{
		return Long.toHexString( r.nextLong( ) );
	}

	/**
	 * This returns the current state in the application
	 * @return a state for the game stack
	 */
	public String getState( )
	{
		return MyState;
	}

	/**
	 * This method allows you set the state in the application
	 * @param s is the string that becomes the state
	 */

	public void setState( String s )
	{
		MyState = s;
	}
}
